Optimal. Leaf size=128 \[ -\frac{d^2 \log (c \cos (e+f x)+d \sin (e+f x))}{a f (-d+i c) \left (c^2+d^2\right )}-\frac{c d x}{a (-d+i c) \left (c^2+d^2\right )}-\frac{1}{2 f (-d+i c) (a+i a \tan (e+f x))}+\frac{x}{2 a (c+i d)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.144501, antiderivative size = 128, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {3551, 3479, 8, 3484, 3530} \[ -\frac{d^2 \log (c \cos (e+f x)+d \sin (e+f x))}{a f (-d+i c) \left (c^2+d^2\right )}-\frac{c d x}{a (-d+i c) \left (c^2+d^2\right )}-\frac{1}{2 f (-d+i c) (a+i a \tan (e+f x))}+\frac{x}{2 a (c+i d)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3551
Rule 3479
Rule 8
Rule 3484
Rule 3530
Rubi steps
\begin{align*} \int \frac{1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))} \, dx &=\frac{\int \frac{1}{a+i a \tan (e+f x)} \, dx}{c+i d}-\frac{d \int \frac{1}{c+d \tan (e+f x)} \, dx}{a (i c-d)}\\ &=-\frac{c d x}{a (i c-d) \left (c^2+d^2\right )}-\frac{1}{2 (i c-d) f (a+i a \tan (e+f x))}+\frac{\int 1 \, dx}{2 a (c+i d)}-\frac{d^2 \int \frac{d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a (i c-d) \left (c^2+d^2\right )}\\ &=\frac{x}{2 a (c+i d)}-\frac{c d x}{a (i c-d) \left (c^2+d^2\right )}-\frac{d^2 \log (c \cos (e+f x)+d \sin (e+f x))}{a (i c-d) \left (c^2+d^2\right ) f}-\frac{1}{2 (i c-d) f (a+i a \tan (e+f x))}\\ \end{align*}
Mathematica [A] time = 1.12042, size = 206, normalized size = 1.61 \[ \frac{-2 i c^2 f x+c^2+2 d^2 \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )-4 d^2 (\tan (e+f x)-i) \tan ^{-1}\left (\frac{c \sin (f x)+d \cos (f x)}{d \sin (f x)-c \cos (f x)}\right )+\tan (e+f x) \left (2 i d^2 \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )+(c+i d) (2 c f x-i c+2 i d f x-d)\right )+4 c d f x+2 i d^2 f x+d^2}{4 a f (c-i d) (c+i d)^2 (\tan (e+f x)-i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.052, size = 155, normalized size = 1.2 \begin{align*}{\frac{1}{af \left ( 2\,id+2\,c \right ) \left ( \tan \left ( fx+e \right ) -i \right ) }}-{\frac{{\frac{i}{4}}\ln \left ( \tan \left ( fx+e \right ) -i \right ) c}{af \left ( c+id \right ) ^{2}}}+{\frac{3\,\ln \left ( \tan \left ( fx+e \right ) -i \right ) d}{4\,af \left ( c+id \right ) ^{2}}}-{\frac{i\ln \left ( \tan \left ( fx+e \right ) +i \right ) }{af \left ( 4\,id-4\,c \right ) }}-{\frac{i{d}^{2}\ln \left ( c+d\tan \left ( fx+e \right ) \right ) }{af \left ( id-c \right ) \left ( c+id \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.63908, size = 306, normalized size = 2.39 \begin{align*} \frac{{\left ({\left (-2 i \, c^{2} + 4 \, c d - 6 i \, d^{2}\right )} f x e^{\left (2 i \, f x + 2 i \, e\right )} + 4 \, d^{2} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (\frac{{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right ) + c^{2} + d^{2}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{{\left (-4 i \, a c^{3} + 4 \, a c^{2} d - 4 i \, a c d^{2} + 4 \, a d^{3}\right )} f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.40414, size = 243, normalized size = 1.9 \begin{align*} -\frac{-\frac{8 i \, d^{3} \log \left (-i \, d \tan \left (f x + e\right ) - i \, c\right )}{2 \, a c^{3} d + 2 i \, a c^{2} d^{2} + 2 \, a c d^{3} + 2 i \, a d^{4}} - \frac{{\left (-i \, c + 3 \, d\right )} \log \left (i \, \tan \left (f x + e\right ) + 1\right )}{a c^{2} + 2 i \, a c d - a d^{2}} - \frac{8 \, \log \left (\tan \left (f x + e\right ) + i\right )}{-8 i \, a c - 8 \, a d} - \frac{i \, c \tan \left (f x + e\right ) - 3 \, d \tan \left (f x + e\right ) + 3 \, c + 5 i \, d}{{\left (a c^{2} + 2 i \, a c d - a d^{2}\right )}{\left (\tan \left (f x + e\right ) - i\right )}}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]